<template>
	<div class="a">
		<el-button @click="addNum">addNum</el-button>
		<el-button @click="toTest">toTest</el-button>
		<div class="b">123</div>
		<hr>
		<HelloWorld></HelloWorld>
	</div>
</template>

<script>
	import HelloWorld from '@/components/HelloWorld.vue'
	import axios from 'axios'
	import {createApp} from 'vue'
	import router from '@/router'
	// import store from '@/store'
	import { useStore } from 'vuex'
	export default {
		name:"Home",
		components: {
		    HelloWorld
		  },
		setup(){
			const store = useStore()
			// debugger;
			return {
				toTest(){
					router.push('/Test')
				},
				addNum(){
					// debugger;
					store.dispatch('setCount',store.getters.count+1)
					// // debugger;
					// console.log(store.getters.count)
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.a {
		color:red;
		.b {color:#000;}
	}
</style>
